package com.example.wly.middletestapplication;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class W1767111101Activity extends AppCompatActivity {
     int beijia=0;
    int jia=0;
    int put=0;
    private EditText addBeiJia;
    private EditText addJia;
    private EditText addPut;
    private Button btnStrat;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_w1767111101);
       final EditText addBeiJia=(EditText)findViewById(R.id.add_beijia);
        final EditText addJia=(EditText) findViewById(R.id.add_jia);
        final EditText addPut=(EditText) findViewById(R.id.add_put);
        Button btnStrat=(Button)findViewById(R.id.btn_start_one);
        btnStrat.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                String str1=addBeiJia.getText().toString();
                beijia=Integer.parseInt(str1);
                String str2=addJia.getText().toString();
                jia=Integer.parseInt(str2);
                put=beijia+jia;
                addPut.setText(""+put);
            }
        });
    }
}
